// 房屋信息接口类型定义

export interface HouseInfo {
  id: number;
  number: number;
  unitId: number;
  floorId: number;
  renterId: number;
  orientation: string;
  floorSpace: string;
  insideSpace: string;
  sharedSpace: string;
  room: number;
  hall: number;
  toilet: number;
  updateTime: string;
  createTime: string;
  ownerId: number;
  tenantId: number;
}

export interface GetHouseByOwnerIdReq {
  ownerId: number;
}

export interface GetHouseByOwnerIdRes {
  code: number;
  data: HouseInfo[];
  message: string;
}

// 房屋详情接口类型定义
export interface HouseDetail {
  houseNum: string;
  ownerId: number;
  ownerName: string;
  ownerPhone: string;
  cellId: number;
  cellName: string;
  buildingId: number;
  buildingName: string;
  renterId: number;
  renterName: string;
  renterPhone: string;
  orientation: string;
  floorSpace: string;
  insideSpace: string;
  sharedSpace: string;
  room: number;
  hall: number;
  toilet: number;
  id: number;
}

export interface GetHouseDetailReq {
  houseId: number;
}

export interface GetHouseDetailRes {
  code: number;
  data: HouseDetail;
  message: string;
}

// 房屋出租相关接口类型定义
export interface SetHouseRentReq {
  houseId: number;
  ownerId: number;
  cellId: number;
  address: string;
  price: number;
  type: number;
  remark: string;
}

export interface SetHouseRentRes {
  code: number;
  data: any;
  message: string;
}

// 房屋出租状态检查接口类型定义
export interface CheckHouseRentReq {
  houseId: number;
}

export interface HouseRentInfo {
  id: number;
  houseId: number;
  ownerId: number;
  cellId: number;
  address: string;
  price: number;
  status: number;
  type: number;
  remark: string;
  createTime: string;
  updateTime: string;
  tenantId: number;
}

export interface CheckHouseRentRes {
  code: number;
  data: HouseRentInfo | null;
  message: string;
}

// 房源列表查询接口类型定义
export interface QueryHouseListReq {
  page: number;
  limit: number;
  tenantId: number;
  name: string;
}

export interface HouseListItem {
  id: number;
  houseId: number;
  houseNum: string;
  ownerId: number;
  ownerName: string;
  ownerPhone: string;
  cellId: number;
  cellName: string;
  address: string;
  price: number;
  status: number;
  type: number;
  remark: string;
}

export interface QueryHouseListRes {
  code: number;
  data: {
    total: number;
    list: HouseListItem[];
    pageNum: number;
    pageSize: number;
    size: number;
    startRow: number;
    endRow: number;
    pages: number;
    prePage: number;
    nextPage: number;
    isFirstPage: boolean;
    isLastPage: boolean;
    hasPreviousPage: boolean;
    hasNextPage: boolean;
    navigatePages: number;
    navigatepageNums: number[];
    navigateFirstPage: number;
    navigateLastPage: number;
  };
  message: string;
}